---
network:
  version: {{ netplan_configuration['network']['version']|default('2') }}
{% if netplan_renderer is not none %}
  renderer: {{ netplan_renderer }}
{% endif %}
{% if netplan_configuration['network']['ethernets'] is defined %}
  ethernets:
{{ netplan_configuration['network']['ethernets']|to_nice_yaml|indent(4, true) }}
{% endif %}
{% if netplan_configuration['network']['wifis'] is defined %}
  wifis:
{{ netplan_configuration['network']['wifis']|to_nice_yaml|indent(4, true) }}
{% endif %}
{% if netplan_configuration['network']['bonds'] is defined %}
  bonds:
{{ netplan_configuration['network']['bonds']|to_nice_yaml|indent(4, true) }}
{% endif %}
{% if netplan_configuration['network']['bridges'] is defined %}
  bridges:
{{ netplan_configuration['network']['bridges']|to_nice_yaml|indent(4, true) }}
{% endif %}
{% if netplan_configuration['network']['vlans'] is defined %}
  vlans:
{{ netplan_configuration['network']['vlans']|to_nice_yaml|indent(4, true) }}
{% endif %}
